<html>
	<head>
		<title>MP3 - PHP</title>
		<link type="text/css" rel="stylesheet" href="/tardes/css/style.css" />
		<script type="text/javascript" src="/tardes/js/libs/jquery.js"></script>
		<script type="text/javascript" src="/tardes/js/controlRegistre.js"></script>  
	</head>
	<body>
		<div>
			<table class="header">
			<tr>
			<td align="right" width="250"></td>
			<td align="center"><h1 class="titulo">MP3 - PHP</h1></td>
			<td align="right" width="250">
			{if isset($usuari) && $usuari != ''}
				Benvingut, {$usuari}
				<form method="POST" action="sortir.php" enctype="multipart/form-data">
					<input type="submit" name="sortir" value="Sortir"/>
				</form>
				<form method="POST" action="pujarArxiu.php" enctype="multipart/form-data">
					<input type="submit" name="inici" value="Pujar Cançó"/>
				</form>
				<form method="POST" action="cerca.php" enctype="multipart/form-data">
					<input type="submit" name="cerca" value="Cercar Cançó"/>
				</form>
				<form method="POST" action="veurePlaylists.php" enctype="multipart/form-data">
					<input type="submit" name="veure" value="Reproduir Playlists"/>
				</form>
				<form method="POST" action="miCuenta.php" enctype="multipart/form-data">
					<input type="submit" name="cuenta" value="Mi Cuenta"/>
				</form>
			{else}
			<form method="POST" action="login.php" enctype="multipart/form-data">
			<table width="250">
				<tr>
					<td align="right">Usuari: </td>
					<td><input type="text" name="usuari"/></td>
				</tr>
				<tr>
					<td align="right">Paraula de pas:</td>
					<td><input type="text" name="pdp"/></td>
				</tr>
				<tr>
					<td></td>
					<td><input type="submit" name="login" value="Login"/></td>
				</tr>
				{if isset($missatge) && $missatge != ""}
					{$missatge}
				{/if}
			</form>
			<form method="POST" action="registrar.php" enctype="multipart/form-data">
			<tr>
					<td>Ets un nou usuari?</td>
					<td><input type="submit" name="registrar" value="Registrar"/></td>
				</tr>
			</table>
			</form>
			{/if}
			</td>
			</tr>
			</table>
		</div>